<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Importar XLS Erros</title>
	<style type="text/css">
.ui-widget {
	font-size: 80%;
}

ul {
	list-style-type: none;
}

.ui-fileupload-content {
	border: none;
	background: none;
	padding: 0px;
}
</style>
</h:head>
<f:metadata>
	<f:viewParam name="idCLP" value="#{importarXLSErrosMBean.idCLP}"
		required="false" />
</f:metadata>
<f:event type="preRenderView"
	listener="#{importarXLSErrosMBean.initializeAfter}" />
<h:body>
	<h:form>
		<p:messages id="modalMessages" globalOnly="false" autoUpdate="true" />

		<ul>
			<li><p:fileUpload
					fileUploadListener="#{importarXLSErrosMBean.upload}" auto="true"
					dragDropSupport="false" multiple="false"
					allowTypes="/(\.|\/)(xls|XLS|xlsx|XLSX)$/" label="Selecione" update="@form"
					style="margin-top: 15px;"
					invalidFileMessage="Apenas arquivos com extesão XLS são permitidos" />
			</li>
		</ul>
		<ul>
			<li><h:outputText value="Arquivo Selecionado: "
					rendered="#{not empty importarXLSErrosMBean.nomeArquivo}" /> <h:outputText
					value="#{importarXLSErrosMBean.nomeArquivo}"
					rendered="#{not empty importarXLSErrosMBean.nomeArquivo}" /></li>
		</ul>
		<ul>
			<li><p:commandButton value="Processar"
					actionListener="#{importarXLSErrosMBean.processar}"
					disabled="#{empty importarXLSErrosMBean.nomeArquivo}" /> <p:commandButton
					value="Cancelar"
					actionListener="#{importarXLSErrosMBean.cancelaImportacaoXLS()}" />
			</li>
		</ul>
	</h:form>
</h:body>
</html>